using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using XiaoMan.Model.Models.Mapping;

namespace XiaoMan.Model.Models
{
    public partial class XiaoManS10Context : DbContext
    {
        static XiaoManS10Context()
        {
            Database.SetInitializer<XiaoManS10Context>(null);
        }

        public XiaoManS10Context()
            : base("Name=XiaoManS10Context")
        {
        }

        public DbSet<Diary> Diaries { get; set; }
        public DbSet<Forum_Topic> Forum_Topic { get; set; }
        public DbSet<Forum_Topic_Back> Forum_Topic_Back { get; set; }
        public DbSet<Sys_Config> Sys_Config { get; set; }
        public DbSet<Sys_Disease> Sys_Disease { get; set; }
        public DbSet<Sys_Region> SyS_Region { get; set; }
        public DbSet<Sys_Users> Sys_Users { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new DiaryMap());
            modelBuilder.Configurations.Add(new Forum_TopicMap());
            modelBuilder.Configurations.Add(new Forum_Topic_BackMap());
            modelBuilder.Configurations.Add(new Sys_ConfigMap());
            modelBuilder.Configurations.Add(new Sys_DiseaseMap());
            modelBuilder.Configurations.Add(new Sys_RegionMap());
            modelBuilder.Configurations.Add(new Sys_UsersMap());
        }
    }
}
